TOC Glossary Forward


FTP


Although more people use email than any other Internet application, more data is transferred via FTP than via any other Internet application. FTP is one of the base applications that tie the Internet together. Despite its relative simplicity from a command line, FTP works far better when you can use a graphical application to navigate through remote directories and files.

Note: Keep in mind that a few machines -- ftp.apple.com, for one -- don't allow you to log in if you don't have a valid domain name, such as tidbits.com. Just having an IP number isn't good enough; you must have a name associated with your number, or these sites bounce you out for security reasons. Talk to your system administrator if you're bounced out.

As in the previous sections, I cover the top applications in this area, and then address some other utilities and such that may make your use of FTP better. There are a number of FTP clients available, ranging from an early HyperCard stack (which I remember as being astonishingly cool at the time) to Anarchie and Fetch, the de facto standards in the MacTCP world. I look primarily at Anarchie and Fetch because I think they're the best, but I briefly discuss some of the other FTP programs that I know about. Also, I've included Anarchie 1.5 on the disk, complete with all sorts of bookmarks for interesting places and files.

Note: Many people use Web browsers for FTP because they can, but I often receive complaints about how the Web browser doesn't do this or that. My answer is simply to put away the silly Web browser and use Anarchie. Web browsers may have many talents, but they don't even begin to compare with Anarchie for FTP.


Anarchie


For most people, Peter Lewis's Anarchie is quite simply the best FTP client available for any platform. Not only is it fast, easy to use, and cleanly implemented, but it also does something that I've wanted for quite some time. Anarchie is a full-fledged FTP client, but it can also search Archie servers for files stored on anonymous FTP sites, and once it has found those files, it can retrieve them via FTP with merely a double-click.

Note: Anarchie is pronounced like the word "anarchy," not like the phrase, "an archie." That's the word direct from Peter.


Installation and Setup


You can place Anarchie anywhere on your hard disk, but its folder of bookmarks of popular sites should stay in the same folder as the Anarchie program.

If you're using SLIP or PPP, make sure you're connected, and then launch Anarchie (or else it will open the connection for you, even before you connect to a site). First, go to the Edit menu and choose Preferences. Notice that there are hardly any preferences (see figure 23.1). That's because Anarchie relies entirely on Internet Config, another one of Peter's programs, for all of its common preferences. Since I've also included Internet Config on the disk, that shouldn't be a problem. Just look for the Internet Config section at the beginning of chapter 27, "Utilities & Miscellany."

Figure 23.1: Anarchie Preferences window.

I recommend that you keep Post Process Files selected, since it enables Anarchie to use StuffIt Expander to debinhex and expand files that you download automatically. In Internet Config, you must set your email address, because Anarchie uses your email address as the password when you connect to any anonymous FTP site.

Unless you know that you're behind a firewall (an Internet machine that makes entry into, and often out of, a domain difficult), you shouldn't have to mess with the Firewalls item in the Edit menu. If you are behind a firewall, contact your system administrator and ask about how to work with your organization's firewall.


Basic Usage


There are a number of ways to use Anarchie, depending on what you want to accomplish. If you want to browse around a site listed among Anarchie's bookmarks, choose List Bookmarks from the File menu and double-click on one of them. As you can see, Peter included a large list of the most popular FTP sites for various pieces of Macintosh software (see figure 23.2). The list actually scrolls on for some time -- there was no way to show all of the bookmarks Peter includes.

Figure 23.2: Anarchie Bookmarks window.

If you double-click on one of the bookmarks, Anarchie connects to the remote site and displays the directory listing. Double-clicking on names with folders next to them takes you into that directory, and double-clicking on a file retrieves the file. In this respect, Anarchie resembles the Finder in Name view.

But what if you want to retrieve a specific file that someone has told you about? Go to the FTP menu and choose Get. Anarchie opens the Get via FTP window, which provides fields for the name of the FTP host and the pathname of the file. If you don't know the name of the file but do know the pathname to it, you can click on Get Listing instead of Get File, at which point Anarchie connects to the FTP site and displays the directory listing you've asked for. If you provide the full pathname of the file (including the filename), select Get File, and click on the Get button, Anarchie retrieves the file with no fuss (see figure 23.3).

Figure 23.3: Anarchie Get via FTP window.

Note: Since some URLs contain the name of the FTP server and the full pathname for a file, you can type or paste that information into Anarchie's Get via FTP window. Be aware that if the file you want has been updated, Anarchie won't be able to retrieve it (since the filename will have changed). At that point, simply remove the filename from the end of the pathname and ask Anarchie to get a listing of the directory that file originally lived in to find the updated program.

If you want to connect to a "nonymous" FTP server -- that is, an FTP server that requires a username and password -- simply enter them in the appropriate fields in the Get via FTP window. Anarchie does not display your password in clear text, nor does it ever store your password in a URL or in the log. Peter implemented this for safety because it's all too easy to copy a URL from your home site and send it to someone, and if the password were stored with the URL, you'd be handing it out to the world at large.

If you're retrieving a directory list instead of a file, select the Get Listing button and click on the List button in the Get via FTP window. This brings up an Anarchie directory list window in which you can double-click on files to retrieve them and on folders to open them (see figure 23.4).

Figure 23.4: Anarchie listing window.

You can have multiple listing windows open to multiple sites simultaneously, and from them you can even download multiple files simultaneously by double-clicking them one after another. However, if you select several files at once and choose Get from the FTP menu or hit Return, Anarchie downloads them one after another.

Note: Downloading multiple files at the same time often doesn't work well with overloaded FTP sites, since Anarchie tries to log in once for each file you want and many sites won't allow that.

If you don't know where the file you want lives but you have an idea what it might be called, you can try using an Archie server to find it, and this is where Anarchie shines. Unfortunately, Archie servers are seemingly becoming less and less reliable and useful as time passes, but they can still be worth trying. Go to the File menu and choose Archie. Anarchie brings up the Find window with a field for the Archie server you want to search (with a pop-up menu of all the known servers) and a field for the search term (see figure 23.5).

Figure 23.5: Anarchie Archie window.

You can set how many matches Anarchie asks for, and a checkbox forces the search to be case-sensitive. Case-insensitive searches are generally safer than case-sensitive searches, since you never know how the filename might be capitalized on an FTP site. You want to leave the number of matches relatively low, certainly under 100. If you go above that, not only are you stressing the Internet unnecessarily, but the search takes a lot longer to process.

Lastly, you have the choice of three types of searches: Sub-string, Pattern, or Regular Expression. A Sub-string search is a simple search -- f, for instance, you want to find the Macintosh Internet game Bolo, simply type bolo into the Find field. However, since there are a lot of files out there with the word bolo in their filenames, you'll find far too many files that aren't what you want.

If instead you switch to Pattern searching, you can use a wildcard such as ? (meaning "any character") or * (meaning "any string of characters"). This would enable you to search for bolo*.hqx, which would find any BinHex files whose names start with bolo and end with .hqx.

Most people will never need anything more powerful than Pattern searching, but if you're not most people, you can switch to Regular Expression searching. Regular expressions are tremendously powerful, but they're also terribly confusing and hard to write. If you want to find out more about them, Peter recommends looking at the man pages for ed, a Unix text editor. For this you must log in to a Unix machine and type man ed at the prompt, so don't worry about it if you don't know how to do that. I only occasionally use Pattern searches, and mostly stick to Sub-string searches.


Special Features


Although using Anarchie is simple (when in doubt, double-click on something), Peter added lots of neat features that come in handy -- that's why this section is so long. For even more information on Anarchie, System 7.5 users should check out the Anarchie Guide file available under the Guide menu in the upper right corner of your screen, next to the Applications menu. Peter's friend Quinn wrote the Anarchie Guide, and it's not only excellent, it may have been the first AppleGuide support outside of Apple when Peter shipped it with Anarchie 1.4.

Note: Unfortunately, there simply wasn't room on the ISKM disk to include the excellent Anarchie Guide file, so Peter allowed me to include a "Get Anarchie Guide" bookmark instead. Once you have your Internet connection set up, just double-click that bookmark to retrieve the Anarchie Guide (when you've got it, it must live in the same folder as Anarchie).

When you have a directory listing window showing, you can copy one or more of the entries in URL format. This may seem minor, but if you've ever wanted to send someone a list of files in a specific directory, you'll love this feature. If you hold down the Option key when you choose Copy or press Command-C, Anarchie copies the selected entries in URL format but without the angle brackets at the beginning and end of the URL. Needless to say, I used this feature heavily while writing this book, and I use it every week in preparing TidBITS.

Anarchie's knowledge of URLs is even more useful than it seems. If you see a URL for a file in TidBITS or anywhere else on the Internet, you can copy that URL and paste it into the Host field in Anarchie's Get via FTP window (Anarchie splits up the URL properly between the fields). I use this feature all the time, since URLs are becoming the standard way to tell someone where a file lives, and it's so easy to, say, copy a URL out of an email message and paste it into Anarchie.

Of course, if you use one of the main newsreaders, you can simply Command-click (or less commonly now, Option-click) on an FTP URL in those programs to have Anarchie retrieve it automatically. This too is tremendously useful, and in all likelihood, this feature will be migrating to Eudora in the future as well.

If you hold down the Control key before selecting the File menu, you see that some of the menu items change. Most notably, Retry changes to Edit Retry, and Open Bookmark changes to Edit Bookmark. This is handy, but what's even handier is that Control-clicking on an item in any Anarchie list window displays a Get via FTP window with the information from that item in it, ready for editing. Anarchie also supports many of the same shortcuts that work in the Finder, so you can move up a level with Command-up arrow, for instance.

In another feature copied from the Finder, if you hold down the Command key and click on the name of an Anarchie listing window, Anarchie shows you the full path to that window.

I mentioned Anarchie's Bookmarks window earlier, but didn't note that you can create your own bookmarks. They can point to an FTP site, a specific directory on an FTP site, or a file available via anonymous FTP. So, if you find yourself visiting the same site or directory frequently, simply select the appropriate entry in a directory listing window and choose Save Bookmark from the File menu. If nothing is selected, Anarchie sets the bookmark to the directory referenced by the window itself. Anarchie's bookmarks are extremely useful for providing simple access to files on an FTP site, because double-clicking on the bookmark file to open it automatically retrieves the file that the bookmark references. This is precisely how I created the Essential Bookmarks that I include on the disk.

If you visit the same FTP sites over and over again, as I do, you may find Anarchie's Log window useful. Anarchie records every directory listing and file retrieval action in a log file. Selecting Show Log from Anarchie's Window menu displays the listing of all of these actions, and double-clicking on one works just like double-clicking on any item in an Anarchie window. So, if you retrieve a file from a certain directory and want to go back there later on for another file, try the Log window.

Also under the Window menu is Show Transcript, which shows precisely what you would see had you used a Unix shell account for FTP. The main advantage of this is that Anarchie's normal error messages are terse, so if you want the full error (which usually tells you that the FTP site in question cannot handle any more users at that time), look in the Transcript window (see figure 23.6).

Figure 23.6: Anarchie Transcript window.

If you're running System 7.5 or later and have the Macintosh Drag and Drop extension installed, you can use what Apple calls the Drag Manager with Anarchie. The Drag Manager enables you to drag files from an Anarchie window to a Finder window or to your desktop to download them.

You can drag files from the Finder into an Anarchie window that you've opened (you must have upload access to the FTP site reflected in that window) to upload them. Anarchie uses the suffix mappings from Internet Config to guess at how to upload files, and it's worked properly with the files I've thrown at it, in terms of using ASCII or binary uploads.

If you want to delete a file from an FTP site where you have access, simply drag it to the Trash icon on your Finder's desktop. I cannot begin to tell you how unbelievably cool this feature is.

New in Anarchie 1.5 is a Rename command in the FTP menu -- it does what you would expect: it lets you rename a file. The only trick is that Anarchie doesn't update the window you're looking at, so if you delete or rename a file, you must choose Retry from the File menu to get a new look at what's in the window.

Anarchie is scriptable and recordable via Apple's AppleScript and UserLand's Frontier; this opens up Internet file retrieval to some extremely necessary automation. Anarchie supports Frontier's Menu Sharing and includes some Frontier stuff from Leonard Rosenthol to get you started if you already own Frontier. Also included are some sample AppleScript scripts for automating file downloads and the like.

By clicking on the column names, you can sort any list in Anarchie by name, date, size, host, and so on. Sorting by zone lets you see which hosts are probably closest to you and best to use if a choice exists.

Anarchie works in a stateless mode, which means that it doesn't keep the FTP connection open unless it's actually transferring a file or a directory listing. This is an extremely efficient way of using FTP (more like Gopher or the Web than FTP, in fact, because Gopher and the Web also only keep the connection open while you're transferring data).

Note: Anarchie's stateless mode does mean that you may be able to navigate into an FTP site but then be rejected when you try to retrieve a file, because too many other people have logged in while you were navigating around.

Finally, Anarchie's About box displays the number of searches you've made, the number of files you've transferred, and the number of kilobytes you've transferred. Anarchie translates this into a rating. I don't know how many levels there are, but I just hit Net Destroyer (complete with a spoken congratulations from Anarchie) after doing 34 searches and 2,260 transfers for 198.3 MB of files. Some folks are higher, but I suspect they're padding their totals. When he read that last comment, Peter accused me of just being jealous. He's probably right.


Evaluation and Details


Anarchie is essential for your Internet tool kit. Despite the slowness and flakiness of Archie servers and the continual problems with finding new files via Archie, Anarchie has proven itself time and time again for me in the months I've used it. Do read the documentation, because there are a number of tips and tricks that you won't otherwise discover.

Anarchie costs $10. I strongly encourage you to pay for Anarchie if you find yourself using it. It's an essential Internet tool, and we need to keep Peter happy so that he keeps writing great programs and releasing them as freeware or shareware. Peter now works with Kagi Shareware, a company which accepts shareware payments in a multitude of forms for shareware authors and then pays the authors all but a small handling fee. You can use the Register application, which Peter also wrote and which comes with Anarchie, to easily pay for Anarchie through Kagi.

Anarchie is included on the disk that comes with this book, and you can retrieve the latest version of Anarchie in:

ftp://ftp.tidbits.com/pub/tidbits/tisk/tcp/


Fetch


Fetch comes to the Internet community from Jim Matthews of Dartmouth College, whose programmers have been notably active in developing and distributing Macintosh software over the years.

Fetch is one of the most long-lived MacTCP-based applications, and Jim continues to update it, adding features and bringing Fetch up to speed with Power Mac-native code. Fetch's most recent upgrade adds such useful features as multiple simultaneous connections to different sites (or to the same site with the Allow Duplicate Connections preference selected), a new interface, drag and drop support, a new bookmark list reminiscent of Anarchie's list, better firewall support, Internet Config support, and AppleScript support.

Note: Unfortunately, Fetch 3.0 wasn't quite finished as I write this, so there may be a few slight changes in the interface.


Installation and Setup


When you first launch Fetch, it presents you with a New Connection dialog, and in fact, if you want to enter things such as userid and password manually, you can use the program right away. I do recommend that you configure the preferences first, though, since they do some of the work for you. From the Customize menu, choose Preferences to see a tabbed dialog that lets you set all of Fetch's preferences. However, you can satisfy your basic needs by simply selecting the Use Internet Config button in the General tab of the preferences. Click on the OK button to close the Preferences dialog, quit Fetch, and launch it again. When it comes back up, look in the Preference dialog again, and you'll see that Fetch has snagged a bunch of preferences from Internet Config, such as your email address and the location where you want downloads to be saved (see figure 23.7).

Figure 23.7: Fetch Preferences dialog.

Of course, if you don't use Internet Config (and I strongly recommend that you do use it, which is why I included it on the ISKM disk), you must go through and set all of Fetch's options by hand.


Basic Usage


When you launch Fetch, it opens a New Connection dialog box that enables you to pick an FTP site from a Shortcuts pop-up menu or type in the necessary information to connect to a new one (see figure 23.8).

Figure 23.8: Fetch New Connection dialog.

In this dialog, you can enter the machine name to which you want to connect, your userid (which is usually anonymous, and which can be left blank if so), your password (which should be your full email address, and which can be left blank if you've entered it in Fetch's Preferences dialog), and the directory in which you want to start on the remote machine. Of course, if you're using Fetch to connect to a personal account on an Internet machine, the userid is your userid and the password is whatever you've set it to. Although many people use Fetch with their own accounts, anonymous FTP is by far the most common usage.

Note: Some sites are finicky about your email address when it's used as an anonymous FTP password. A workaround might be to use your userid along with the @ sign (for example, ace@) -- and nothing else. That forces the remote FTP server to figure out the machine name and domain on its own, which sometimes works better.

New in Fetch 3.0 is a bookmark list window feature, and at launch Fetch automatically opens a special bookmark list window called Fetch Shortcuts (see figure 23.9) that contains the same items that are in the Shortcuts pop-up menu in the New Connection dialog. Although the two features may seem redundant, Jim wanted to add a new way of displaying shortcuts, but didn't want to rip out the New Connection dialog that Fetch users have been used to for years. You can create more of your own bookmark list windows that don't show up automatically or have their contents in the Shortcuts pop-up menu -- it's a handy way of organizing infrequently used bookmarks.

Figure 23.9: Fetch Shortcuts window.

You could enter in connection information in the New Connection dialog each time you connect to an FTP site, but that would be silly. Fetch enables you to add your own shortcuts to the Shortcuts pop-up menu and the Fetch Shortcuts bookmark list with the New Shortcut command in the Customize menu, which brings up a dialog for creating new shortcuts. The New Shortcut menu item is visible whenever you don't have a bookmark list window in front.

If a bookmark list window is in front, the New Shortcut menu item changes to New Bookmark List Item. The two commands do essentially the same thing, but a shortcut lives in the Fetch Shortcuts window and in the Shortcuts pop-up menu, whereas you can add Bookmark List Items to any bookmark list window. To edit an existing shortcut, you must select it in the bookmark list window and choose Edit Bookmark List Item from the Customize menu -- I prefer the shortcut, which is Option double-click (see figure 23.10).

Figure 23.10: Fetch Bookmark Editor.

In any event, you can connect to a site either by choosing a site from the New Connection dialog's Shortcuts pop-up menu and clicking on the OK button or by double-clicking on it in a bookmark list window. Either way, Fetch then displays its main window, where you do most of your work uploading and downloading (see figure 23.11). Fetch also displays a message window for any automatic messages that the administrator of that server wants you to read. You can leave the messages window open in the background, as I've done in the screen shot, or you can close it to clean up your screen.

Figure 23.11: Fetch main window.

The main element in Fetch's window is the list of files and directories on the left side of the window (although that list is, of course, empty until you connect). Above it and to the left is a little open folder icon that you can drag over to a bookmark list window to save the current directory as a bookmark. To the right of the file listing are two buttons that enable you to get or send (Put) a file. Under that are two radio buttons, Text and Binary, with which you can indicate what sort of files you are transferring. A third button, Automatic, lets Fetch try to determine the file type for you based on the file extension. I've stuck with Automatic almost entirely and haven't had any trouble, but you might need to switch manually at some point if files are named strangely.

To the right of all the buttons is the status area. At the top of the feedback area under Status, Fetch reports precisely what it's doing, such as "Connecting," "Changing dir," "Getting file list," and so on. Then comes the File section, which lists which file Fetch is working on, what format it's in, and how large it is. Below that is the Transfer feedback section, where Fetch reports how many bytes it has transferred along with the rate at which it is transferring the file. New in Fetch 3.0 is a graphical pie display of how large the file is and how much of it has been transferred. You can resize Fetch's main window or place it anywhere on the screen.

If you've used the Mac for any length of time, you'll know how to use Fetch immediately. You double-click on a directory (they have little folder icons) in the list to enter that directory. Double-clicking on a file does the same thing as selecting the file with a single click and then clicking on the Get File button. You can select contiguous multiple files by Shift-clicking on them or multiple discontiguous files by Command-clicking on them, at which point clicking on the Get File button snags the lot of them. After you click on the Get File button, Fetch figures out what sort of file you're getting and either asks you to save it with a standard Save File dialog box or automatically places it in a folder you've defined in your Preferences.

Fetch now fully supports Apple's Drag Manager, so if you have System 7.5 and the necessary Drag Manager extensions installed, you can drag files from Fetch's window to the Finder to download them, to the Trash to delete them (assuming the site lets you do that), and from the Finder to Fetch's window to upload them. The Drag Manager also provides an easy way of making shortcuts -- just drag a file or a folder from a Fetch window into a bookmark list window.

When you download a file, Fetch can launch StuffIt Expander to process a downloaded file (or launch the downloaded file itself, if it's a self-extracting application). If you've used Internet Config, Fetch gets its post-processing settings from Internet Config.


Special Features


I especially like Fetch's View File command in the Remote menu because it displays text files, which is useful for browsing through the README files that are ubiquitous on FTP sites. Anarchie has a similar feature, but actually downloads a file and then opens it in the word processor you choose, which works fine but leaves lots of files called README lying around.

In the Directories menu, Fetch lists all of the directories you have visited, not only in that session, but in the past for the current site as well. This is tremendously useful because you tend to go back to the same places over and over again.

Fetch supports Anarchie's bookmarks so you can save and open them, which makes for a nice interaction between the two. You can even drag an Anarchie bookmark file from the Finder into one of Fetch's bookmark list windows to add it. Fetch accepts URLs pasted into its New Connection dialog, and if you select a file or folder and choose Copy from the Edit menu, Fetch places the appropriate URL in the clipboard.

Fetch now supports multiple connections to different sites at the same time, and although it does support multiple connections to the same site, it will reuse idle windows if possible rather than opening new ones.

You can now sort the items in Fetch's listing windows by clicking on the titles of the various columns. I use this a lot for seeing which files have been uploaded to a site most recently.

If you have access to your own account via FTP, you can use Fetch to create and remove directories, rename files, and even issue raw FTP commands. These features won't help the average user of anonymous FTP, but for someone managing their own account, this kind of control is useful. I especially like being able to have Fetch issue a LIST -R command that lists the entire contents of a site under the current directory.

Finally, although this feature is hard to quantify, Fetch seems to be the most solid of all the FTP clients at connecting to and working with strange FTP servers. Every now and then I hit one that Anarchie won't handle, and Fetch always works fine, especially when uploading.


Evaluation and Details


How does Fetch compare to Anarchie? I like and use both programs on a regular basis, but at this point I mostly use Fetch for maintaining files on my account. I use it exclusively to manage ftp.tidbits.com, and it's been a godsend. However, I find that when I'm looking for a file or browsing FTP sites, I prefer Anarchie, mostly because of its multiple windows to the same site and ease of use. Even though Fetch now has multiple connections, it can't open multiple windows to the same site or have multiple downloads from different parts of the same site going at the same time. Mostly because of the single-window approach, you don't use Fetch to explore -- you use it to get your work done. It performs admirably, especially if your work involves a fair amount of uploading. Of course, one of the best parts about Fetch is its running dog cursor, but that you must see for yourself.

Educational institutions and nonprofit organizations may use Fetch free of charge, and everyone else can license it from Dartmouth for $25. Read the Fetch Help for more information about licensing. You can retrieve the latest version of Fetch via FTP in either of the following:

http://www.dartmouth.edu/pages/softdev/fetch.html

ftp://ftp.dartmouth.edu/pub/mac/

ftp://ftp.tidbits.com/pub/tidbits/tisk/tcp/


Other FTP Programs


Although Anarchie and Fetch are the acknowledged standards for FTP clients on the net, several others exist, although they're not widely used, with the possible exception of Snatcher, from Software Ventures. I've removed information about XferIt and HyperFTP, mostly because they're so old and completely ignored that I'm not even sure if they'll work with most modern systems. Although both are still available on the Internet, don't bother checking them out for anything but a historical lesson. Also ignored is a program called MacFSP, which is a client for a different file transfer protocol called FSP that is barely used anywhere. Finally, I'm also not including information here about Communications Toolbox FTP tools, since I basically don't see the point in using them -- if you can use an FTP tool, you can use Anarchie. Unless I give a separate URL, the programs mentioned below are in:

ftp://ftp.tidbits.com/pub/tidbits/tisk/tcp/


Finalizing FTP


The Web may be the hottest thing on the Internet right now, but frankly, I spend far more time downloading files via FTP, usually in Anarchie. I also do a fair amount of uploading, usually in Fetch, and all I can say is that you should use one of these programs. Web browsers just don't do FTP well right now.

But enough about FTP! Let's move on to another method of retrieving data, Gopher.


TOC Glossary Forward